﻿
namespace ConsoleApp3
{
    //3、接口
    internal class Program
    {


        static void Main(string[] args)
        {
            Tank superTank = new SuperTank();
            Tank heavyTank = new HeavyTank();


            Driver driver1 = new Driver(superTank);
            Gunner gunner1 = new Gunner(superTank);

            Driver driver2 = new Driver(heavyTank);
            Gunner gunner2 = new Gunner(heavyTank);


            gunner1.Fire();
            gunner1.MultFire();
            driver1.Drive();

            gunner2.Fire();
            gunner2.MultFire();
            driver2.Drive();

            Console.WriteLine("*******");
            Car car = new Car();
            Rocket rocket = new Rocket();

            driver1.runnable = car;
            gunner1.Fireable = rocket;

            driver1.Drive();
            gunner1.Fire();
            gunner1.MultFire();
            

        }




    }
}
